#! /usr/bin/python

power2 = set()

for i in range(1, 2000):
    power2.add(2**i)

up = 0
down = 0
klist = []
for y in range(3, 10**6, 2):
    n = y**2 - 1
    if n%4 == 0:
	x = (1 + y)/2
	k = n/4
	up += 1
	if x in power2: 
	   down += 1
	if down/float(up) < 1/float(12345):
	   print up, down, k
	   break
